package com.atguigu.gmall.service.impl;

import com.atguigu.gmall.entity.PlatformPropertyValue;
import com.atguigu.gmall.mapper.PlatformPropertyValueMapper;
import com.atguigu.gmall.service.PlatformPropertyValueService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlatformPropertyValueServiceImpl extends ServiceImpl<PlatformPropertyValueMapper, PlatformPropertyValue> implements PlatformPropertyValueService {
    @Override
    public List<PlatformPropertyValue> getPropertyValueByPropertyKeyId(Long propertyKeyId) {
        QueryWrapper<PlatformPropertyValue> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("property_key_id", propertyKeyId);
        return baseMapper.selectList(queryWrapper);
    }
}
